{% extends "projects/project_edit_base.html" %}
{% load i18n %}
{% load static %}

{% block title %}{% trans "Documentation Advertising" %}{% endblock %}

{% block extra_links %}
  <link rel="stylesheet" type="text/css" href="{% static "projects/css/admin.css" %}" />
{% endblock %}

{% block project-ads-active %}active{% endblock %}
{% block project_edit_content_header %}{% trans "Documentation Advertising" %}{% endblock %}

{% block project_edit_content %}
  <p>
    {% blocktrans trimmed %}
      Read the Docs is an open source project.
      In order to maintain service, we rely on both the
      support of our users, and from sponsor support.
    {% endblocktrans %}
  </p>

  <p>
    {% blocktrans trimmed %}
      We will periodically run advertisements on built documentation pages for
      sponsors, however we have strict guidelines on advertisements:
    {% endblocktrans %}
  </p>

  <ul class="project-ads-guidelines">
    <li>
      {% blocktrans trimmed %}
        We don't give sponsors access to user information.
      {% endblocktrans %}
    </li>
    <li>
      {% blocktrans trimmed %}
        We only report the number of impressions and number of ad clicks.
      {% endblocktrans %}
    </li>
    <li>
      {% blocktrans trimmed %}
        We only allow and image and text ads which we host ourselves.
        There are no advertiser-supplied scripts running on Read the Docs.
      {% endblocktrans %}
    </li>
  </ul>

  <p>
    {% blocktrans trimmed %}
      For more details on advertising on Read the Docs
      including the privacy protections we have in place for users
      and <a href="https://docs.readthedocs.io/page/advertising/ethical-advertising.html#community-ads">community advertising</a>
      we run on behalf of the open source community,
      see <a href="https://docs.readthedocs.io/page/advertising/ethical-advertising.html">our documentation</a>.
    {% endblocktrans %}
  </p>

  <h4>{% trans "Opting out" %}</h4>

  <p>
    {% url 'account_advertising' as ads_preferences_url %}
    {% blocktrans trimmed %}
      In addition to the advertising preferences we have for <a href="{{ ads_preferences_url }}">individual users</a>,
      we have multiple ways for projects to opt out of advertising on Read the Docs.
    {% endblocktrans %}
  </p>

  <ul class="module-list project-ads-support">
    <li class="module-item">
      {% blocktrans trimmed %}
        If you are part of a company that uses Read the Docs to host documentation for a commercial product,
        please consider <a href="https://readthedocs.com/">Read the Docs for Business</a>
        which offers a completely ad-free experience,
        private repositories, private documentation, additional build resources, and dedicated support.
      {% endblocktrans %}
    </li>

    <li class="module-item">
      {% url "gold_detail" as gold_detail %}
      {% blocktrans trimmed %}
        By becoming a <a href="{{ gold_detail }}">Gold member</a> to Read the Docs,
        you may remove advertising from your projects for all visitors.
      {% endblocktrans %}
    </li>

    <li class="module-item">
      {% blocktrans trimmed %}
        Project owners can <a href="#removing-paid-advertising">opt out of paid advertisements</a>
        for their projects.
        Readers will still see community ads for open source projects and conferences.
      {% endblocktrans %}
    </li>

    <li class="module-item">
      {% blocktrans trimmed %}
        If you would like to completely remove advertising from your open source project,
        but both Read the Docs for Business and our Gold memberships don't seem like the right fit,
        please <a href="mailto:ads@readthedocs.org?subject=Alternatives%20to%20advertising">get in touch</a>
        to discuss alternatives to advertising.
      {% endblocktrans %}
    </li>
  </ul>

  <a name="removing-paid-advertising"></a>

  <form method="post" action=".">
    {% csrf_token %}
    {{ form.as_p }}

    <p class="help_text">
      <small>
      {% blocktrans trimmed %}
        If you are a company hosting commercial documentation on our community site,
        we do not allow removing paid advertisements on your documentation.
        Please consider Read the Docs for Business or a Gold membership.
      {% endblocktrans %}
      </small>
    </p>

    <p>
      <input type="submit" value="{% trans "Update advertising preference" %}">
    </p>
  </form>
{% endblock %}
